const svg2Png = (src, w, h) => { 
    let canvas = document.createElement('canvas'); 
    let context = canvas.getContext('2d'); 
    canvas.width = w; 
    canvas.height = h; 
    context.drawImage(src, 0, 0); 
    let png; 
    try { 
      png = canvas.toDataURL("image/png"); 
    } catch (e) { 
        throw e; 
    } 
    return png; 
  }

  export default svg2Png;